package com.zbkj.front.controller.merchant;

import com.github.pagehelper.PageInfo;
import com.zbkj.common.model.express.MerchantExpress;
import com.zbkj.common.page.CommonPage;
import com.zbkj.common.request.MerchantExpressSearchRequest;
import com.zbkj.common.result.CommonResult;
import com.zbkj.service.service.EmployeeMerchantExpressService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;


/**
 * 商户端物流公司控制器
 +----------------------------------------------------------------------
 */
@Slf4j
@RestController
@RequestMapping("api/front/employee/express")
@Api(tags = "移动端商家管理 - 商户端物流公司控制器")
public class EmployeeMerchantExpressController {

    @Autowired
    private EmployeeMerchantExpressService expressService;
    @ApiOperation(value = "商户物流公司分页列表")
    @RequestMapping(value = "/search/page", method = RequestMethod.GET)
    public CommonResult<CommonPage<MerchantExpress>> searchPage(@Validated MerchantExpressSearchRequest request) {
        PageInfo<MerchantExpress> pageInfo = expressService.searchPage(request);
        return CommonResult.success(CommonPage.restPage(pageInfo));
    }
}



